package queuedemo;

import java.util.LinkedList;
import java.util.Queue;

public class Test {
    public static void main(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(12);
        queue.offer(23);
        queue.offer(34);
        Integer val=queue.poll();
        System.out.println(val);
        System.out.println(queue.peek());
        val=queue.poll();
        System.out.println(val);
        System.out.println(queue.peek());

    }
}
